package com.easylive.entity.enums;

public enum UserSexEnum {
    WOMAN (0,"女"),
    MAN (1,"男"),
    UNKNOWN (2,"未知");
    private Integer sex;
    private String desc;
    public String getDesc()
    {
        return desc;
    }
    public Integer getSex()
    {
        return sex;
    }
    UserSexEnum(Integer sex, String desc){
        this.sex = sex;
        this.desc = desc;
    }

    public static UserSexEnum getEnumBySex(Integer sex){
    	for(UserSexEnum item : UserSexEnum.values()){
    		if(item.getSex().equals(sex)){
    			return item;
    		}
    	}
    	return null;
    }
}
